﻿<%@ Page Language="C#" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>报表维护管理界面</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <link rel="stylesheet" type="text/css" href="../../../WebPlugin/jquery-easyui/themes/default/easyui.css"/>
	<link rel="stylesheet" type="text/css" href="../../../WebPlugin/jquery-easyui/themes/icon.css"/>
	<script type="text/javascript" src="../../../WebPlugin/jquery-easyui/jquery-1.7.1.min.js"></script>
	<script type="text/javascript" src="../../../WebPlugin/jquery-easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="../../../WebPlugin/jquery-easyui/locale/easyui-lang-zh_CN.js"></script>

    <script src="../../../WebPlugin/jquery-easyui/JQueryCommon.js" type="text/javascript"></script>
    <script src="../../../WebPlugin/CrystalReport/Print.js" type="text/javascript"></script>
    <script src="../PageJS/ReportDataManager.js" type="text/javascript"></script>
    <script src="../PageJS/ReportData_resultDatadlg.js" type="text/javascript"></script>
</head>

<body class="easyui-layout">
 <div region="west" split="true" id="layout_west" style="width:350px;" closable="false" title="配置存储过程"> 
    <div style="padding:0px;background:#EFEFEF;">
       <a href="#" class="easyui-linkbutton" plain="true" iconCls="icon-add" onclick="btn_AddClass()">添加分类</a>
       <a href="#" class="easyui-linkbutton" plain="true" iconCls="icon-add" onclick="btn_AddTable()">添加报表</a>
       <a href="#" class="easyui-linkbutton" plain="true" iconCls="icon-edit" onclick="btn_AlterTree()">修改</a>
       <a href="#" class="easyui-linkbutton" plain="true" iconCls="icon-cancel" onclick="btn_DelTree()">删除</a>
    </div>
    <ul id="treeload" animate="true"></ul>
 </div>
 <div region="center">
    <div class="easyui-tabs" fit="true">
        <div title="配置报表参数">
            <div id="tool" class="toolbar">
                <a href="#" class="easyui-linkbutton" plain="true" iconCls="icon-reload" onclick="btngrid_onInitField();">参数初始化</a>
                <a href="#" class="easyui-linkbutton" plain="true" iconCls="icon-edit" onclick="btngrid_onEditField();">编辑参数</a>
                <a href="#" class="easyui-linkbutton" plain="true" iconCls="icon-edit" onclick="btngrid_onUpField();">上移</a>
                <a href="#" class="easyui-linkbutton" plain="true" iconCls="icon-edit" onclick="btngrid_onDownField();">下移</a>
            </div>
            <table id="fieldgrid"  class="easyui-datagrid" fit="true" border="false" toolbar="#tool" iconCls="icon-edit" singleSelect="true" pagination="true">
             <thead>
	            <tr>
		            <th field="FieldId" width="80">参数ID</th>
		            <th field="Name" width="120">中文名称</th>
		            <th field="ColumnName" width="120">参数名称</th>
		            <th field="DataType" width="80">数据类型</th>
		            <th field="ColumnLength" width="60">数据长度</th>
		            <th field="UIType" width="80" formatter="UITypeFormatter">控件类型</th>
		            <th field="DataUnitId" width="80">单元数据</th>
		            <th field="DynamicSQL" width="80">动态SQL</th>
		            <th field="MatchRegularExpressions" width="80">匹配表达式</th>
		            <th field="IsMust" width="80">输入输出</th>
	            </tr>
            </thead>
           </table>
        </div>
        <div id="resultDiv" title="报表预览" >
            <div style="padding:0px;background:#EFEFEF; ">
               <a id="btn_searchReport" href="#" class="easyui-linkbutton" disabled="true" plain="true" iconCls="icon-search" onclick="onStartSearchData()">查询报表</a>
               <a id="btn_searchData" href="#" class="easyui-linkbutton" disabled="true" plain="true" iconCls="icon-search" onclick="onStartReportDS()">查看数据源</a>
            </div>
            <%--动态添加报表预览控件--%>
            <div id="printDiv" style="position:absolute; width:100%; height:100%"></div>
        </div>
    </div>
 </div>
 
 
<!-- window开始 -->
<!-- 分类操作 -->
<div id="dlg-addClass" class="easyui-dialog" title="添加分类" style="width:300;height:150px;padding:5px" buttons="#dlg-buttons1" resizable="true" modal="true">
  <form id="formaddclass" method="post">
        <table style="padding:10px;">
           <tr>
                <td>名称:</td>
                <td><input id="formclassname" class="easyui-validatebox"  style="width:200px;" type="text" required="true" name="Name"></input></td>
           </tr>
        </table>  
        <input id="formGeneralLayerId" type="hidden" name="GeneralLayerId" >
        <input id="formPGeneralLayerId" type="hidden" name="PLayerId" >
   </form>
</div>
<div id="dlg-buttons1">
    <a href="#" class="easyui-linkbutton" onclick="dlg_addClassOk();">确定</a>
    <a href="#" class="easyui-linkbutton" onclick="$('#dlg-addClass').dialog('close');">取消</a>
</div>
   
<!-- 存储过程操作 -->
<div id="dlg-addTable" class="easyui-dialog" title="添加报表" style="width:400;height:250px;padding:5px" buttons="#dlg-buttons2" resizable="true" modal="true">
  <form id="formaddtable" method="post">
        <table style="padding:10px;">
           <tr>
                <td>名称:</td>
                <td><input id="formtablename" class="easyui-validatebox"  style="width:200px;" type="text" required="true" name="Name"></input></td>
           </tr>
           <tr>
                <td>选择存储过程:</td>
                <td><input id="formtabletable" class="easyui-combobox"  style="width:200px;" required="true" valueField="code" textField="name" name="ProcedureName" url="Controller.aspx?controller=ReportController&method=GetProcedureDic"></input></td>
           </tr>
           <tr>
                <td>报表文件:</td>
                <td><input id="formReportFileName" class="easyui-validatebox"  style="width:200px;" type="text" name="ReportFileName"></input></td>
           </tr>
           <tr>
                <td>选择报表类型:</td>
                <td><input id="formtabletype" class="easyui-combobox"  style="width:200px;" required="true" valueField="code" textField="name" name="Type"></input></td>
           </tr>
           <tr>
                <td>备注:</td>
                <td><input id="formtablememo" class="easyui-validatebox"  style="width:200px;" type="text" name="Memo"></input></td>
           </tr>
        </table>  
        <input id="formtitileId" type="hidden" name="TitleId">
        <input id="formPLayerId" type="hidden" name="LayerId">
   </form>
   </div>
<div id="dlg-buttons2">
    <a href="#" class="easyui-linkbutton" onclick="dlg_addTableOk();">确定</a>
    <a href="#" class="easyui-linkbutton" onclick="$('#dlg-addTable').dialog('close');">取消</a>
</div>
<!-- 参数操作 -->
 <div id="dlg-editField" class="easyui-dialog" title="编辑参数" style="width:450;height:370;padding:5px" buttons="#dlg-buttons3" resizable="true" modal="true">
  <form id="formeditfield" method="post">
        <table style="padding:10px;">
           <tr>
            <td>中文名称</td>
            <td><input class="easyui-validatebox"  style="width:200px;" type="text" required="true" name="Name"></td>
            </tr>
            <tr>
            <td >参数名称</td>
            <td ><input lass="easyui-validatebox"  style="width:200px;" type="text" required="true" name="ColumnName" readonly="true" ></td>
            </tr>
            <tr>
            <td >控件类型</td>
            <td ><input id="fieldUIType" class="easyui-combobox"  style="width:200px;" required="true" valueField="code" textField="name" name="UIType" ></input></td>
            </tr>
            <tr>
            <td >单元数据</td>
            <td ><input id="fieldDataUnitId" class="easyui-combobox"  style="width:200px;" required="true"  valueField="DataUnitId" textField="Name" name="DataUnitId"></input>&nbsp;&nbsp;<a href="#" style="font-size:12px" onclick="ShowUnitData();">查看数据</a></td>
            </tr>
            <tr>
            <td >动态SQL</td>
            <td ><input id="fieldDynamicSQL" lass="easyui-validatebox"  style="width:200px;" type="text" name="DynamicSQL"/></td>
            </tr>
            <tr>
            <td >匹配表达式</td>
            <td ><input lass="easyui-validatebox"  style="width:200px;" type="text" name="MatchRegularExpressions"/></td>
            </tr>
        </table>  
        <input id="FieldId" type="hidden" name="FieldId" />
   </form>
</div>
<div id="dlg-buttons3">
    <a href="#" class="easyui-linkbutton" onclick="dlg_editFieldOk();">确定</a>
    <a href="#" class="easyui-linkbutton" onclick="$('#dlg-editField').dialog('close');">取消</a>
</div>

<div id="dlg-showunitdata" class="easyui-dialog" title="查看单元数据" style="width:300;height:250px;padding:5px" resizable="true" modal="true">  
        <table id="showunitGrid"  class="easyui-datagrid" fit="true" border="false" iconCls="icon-edit">
         <thead>
            <tr>
	            <th field="code" width="80">代码</th>
	            <th field="name" width="180">名称</th>
            </tr>
        </thead>
       </table>
   </div>
</body>
</html>


<!--#include file="ReportData_resultDatadlg.aspx" -->